import request from "@/api/request";
// 首页课程列表
export const coursesApi = (params) => {
  return request({
    url: "/api/pub/courses",
    method: "get",
    params,
  });
};
export const coursesQueryApi = (params) => {
  return request({
    url: "/api/courses/search",
    method: "get",
    params,
  });
};
export const bannersApi = (params) => {
  return request({
    url: "/api/pub/banners",
    method: "get",
    params,
  });
};

export const courseInfoApi = (id, params) => {
  return request({
    url: "/api/courses/info/" + id,
    method: "get",
    params,
  });
};
export const courseApplyApi = (params) => {
  return request({
    url: "/api/courses/apply",
    method: "post",
    data: params,
  });
};
export const myCoursesApi = (params) => {
  return request({
    url: "/api/courses/my",
    method: "get",
    params,
  });
};
